home *** CD-ROM | disk | FTP | other *** search
- Path: crl.crl.com!not-for-mail
- From: dbridges@crl.com (Dick Bridges)
- Newsgroups: comp.lang.c++
- Subject: [Q] namespace #2
- Date: 4 Mar 1996 09:11:22 -0800
- Organization: CRL Network Services (415) 705-6060 [Login: guest]
- Message-ID: <4hf87q$b2h@crl.crl.com>
- NNTP-Posting-Host: crl.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Given the following namespace:
-
- namespace A
- {
- int i = 56;
- };
-
- How (or can) you use it in two *DIFFERENT* source files? For example:
-
- in one.cpp...
-
- void foo()
- {
- using namespace A;
- cout << i << endl;
- }
-
- and in two.cpp...
-
- void bar()
- {
- using namespace A;
- cout << i << endl;
- }
-
- TIA for an answer.
-